<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('下级退回电话工单审核')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="post-form">
                <div class="select-list">
                    <ul>
                        <li>
                            工单编号：<input type="text" name="myTwfNO"/>
                        </li>
                        <li>
                            派发单位：<input type="text" name="SDeptName"/>
                        </li>

                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm " id="toolbar" role="group">
            <a class="btn btn-success multiple disabled" onclick="$.operate.handleTab()"
               shiro:hasPermission="mTelRcd:process:view">
                <i class="fa fa-plus"></i> 处理
            </a>
        </div>

        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "system/mTelWF";

    $(function () {
        var options = {
            url: prefix + "/cmnFile/treturnFlowJson",
            sortName: "pkId",
            sortOrder: "desc",
            updateUrl: prefix + "/forShow/treturnReason/{id}",
            removeUrl: prefix + "/cmnFile/remove",
            uniqueId: "pkId",
            modalName: "下级退回电话工单审核",
            fixedColumns: true,
            fixedNumber: 1,
            fixedRightNumber: 1,
            columns: [
                {field: 'ck', checkbox: true, title: '&nbsp;'},
                {field: 'pkId', title: 'PkId', hidden: true, visible: false},
                {field: 'wfId', title: 'WfId', hidden: true, visible: false},
                {field: 'telId', title: 'telId', hidden: true, visible: false},
                {field: 'myTwfNO', title: '工单编号', align: 'left', halign: 'center', sortable: true},
                {field: 'myTwfTopic', title: '工单主题', align: 'left', halign: 'center', sortable: true},
                {field: 'seqName', title: '交办次序', align: 'center'},
                {field: 'sortName', title: '性质', align: 'center', sortable: true},
                {field: 'dealName', title: '办理方式', align: 'center', sortable: true},
                {field: 'bkLimit', title: '办理期限', align: 'center', sortable: true},
                {field: 'sdeptName', title: '来自', align: 'left', halign: 'center', sortable: true},
                {field: 'sdDate', title: '派发日期', align: 'center'},
                {field: 'bkDate', title: '退回日期', align: 'center'},
                {field: 'backRemark', title: '退回理由', align: 'left', halign: 'center',
                    formatter:function (value, row, index){
                        return "<span style='cursor: pointer;' title='"+value+"'>"+value+"</span>"
                    },
                    cellStyle:cellEllipsis
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.handleTab(\'' + row.pkId + '\')"><i class="fa fa-edit"></i>处理</a> ');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });

</script>
</body>
</html>